<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page pageEncoding="UTF-8" contentType="text/html;charset=UTF-8"
	import="com.srit.forecast.constant.Constant"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="srit-tag" uri="/srit-constant-tag"%>
<html>
<head>
<title>SevenDays</title>
<script type="text/javascript"
	src="<c:url value="/resources/js/jquery-1.8.0.min.js" />"></script>
<script type="text/javascript"
	src="<c:url value="/resources/js/jquery-ui-1.10.0.custom.min.js" />"></script>
<link href="<c:url value="/resources/css/forecast.css" />"
	rel="stylesheet" type="text/css">
<link
	href="<c:url value="/resources/css/jquery-ui-1.10.0.custom.css" />"
	rel="stylesheet" type="text/css">
<script type="text/javascript"
	src="<c:url value="/resources/views/initDrag.js" />"></script>
<script>
	$(function() {
		$.datepicker.regional['zh-CN'] = {
				clearText : '清除',
				clearStatus : '清除已选日期',
				closeText : '关闭',
				closeStatus : '不改变当前选择',
				prevText : '<上月',
				prevStatus : '显示上月',
				prevBigText : '<<',
				prevBigStatus : '显示上一年',
				nextText : '下月>',
				nextStatus : '显示下月',
				nextBigText : '>>',
				nextBigStatus : '显示下一年',
				currentText : '今天',
				currentStatus : '显示本月',
				monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月',
						'十月', '十一月', '十二月' ],
				monthNamesShort : [ '一', '二', '三', '四', '五', '六', '七', '八', '九', '十',
						'十一', '十二' ],
				monthStatus : '选择月份',
				yearStatus : '选择年份',
				weekHeader : '周',
				weekStatus : '年内周次',
				dayNames : [ '星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六' ],
				dayNamesShort : [ '周日', '周一', '周二', '周三', '周四', '周五', '周六' ],
				dayNamesMin : [ '日', '一', '二', '三', '四', '五', '六' ],
				dayStatus : '设置 DD 为一周起始',
				dateStatus : '选择 m月 d日, DD',
				dateFormat : 'yy-mm-dd',
				firstDay : 1,
				initStatus : '请选择日期',
				isRTL : false
			};
		$.datepicker.setDefaults($.datepicker.regional['zh-CN']);
		//时间控件待替换
		$("#datepicker").datepicker({
			showOn : "button",
			buttonImage : "<c:url value="/resources/images/calendar.png" />",
			buttonImageOnly : true
		});
		$(document).tooltip({
			items : "img",
			content : function() {
				console.log("tooltip")
				var element = $(this);
				if (element.is("[title]")) {
					return element.attr("title");
				}
				if (element.is("img")) {
					return element.attr("alt");
				}
			}
		});

		initDrag('<c:url value="/drag-view"></c:url>');
		$("#saveBtn").click(function() {
			$("#city6HoursVO").submit();
		})
		$("a.copyLink").click(function() {
			console.log(this)
		})
	});
</script>
</head>
<body>
	<div class="center" style="height: 575px">
		<p class="title">未来七天天气预报</p>
		<table width="100%" border="1" class="sevendays_tb">
			<tr>
				<td colspan="3">发布时间</td>
				<td colspan="7" align="left"><input type="text" id="datepicker" /></td>
			</tr>
			<tr>
				<td></td>
				<td colspan="2">市区天气</td>
				<td width="22%" colspan="2">北仑港</td>
				<td width="22%" colspan="2">象山港以北</td>
				<td width="22%" colspan="2">象山港以南</td>
				<td width="4%"></td>

			</tr>
			<tr>
				<td width="5%">日期</td>
				<td width="15%">天气</td>
				<td width="10%">温度</td>
				<td width="11%">风向</td>
				<td width="11%">风力</td>
				<td width="11%">风向</td>
				<td width="11%">风力</td>
				<td width="11%">风向</td>
				<td width="11%">风力</td>
				<td width="4%">复制</td>
			</tr>

			<c:forEach begin="1" end="7" var="i">
				<tr align="center">
					<td>0月0号</td>
					<td><input type="text" /></td>
					<td><input type="text" size="7" /></td>
					<td>
						<div class="drop" code="codeType15">
							<select name="sevenDaysVo[${i}].">
								<c:forEach items="${codeTypeList}" var="codeType">
									<c:if test="${codeType.id==15}">
										<c:forEach items="${codeType.codeList}" var="code">
											<option value="${code.id}">${code.name}</option>
										</c:forEach>
									</c:if>
								</c:forEach>
							</select>
						</div>
					</td>
					<td>
						<div class="drop" code="codeType16">
							<select name="sevenDaysVo[${i}].">
								<c:forEach items="${codeTypeList}" var="codeType">
									<c:if test="${codeType.id==16}">
										<c:forEach items="${codeType.codeList}" var="code">
											<option value="${code.id}">${code.name}</option>
										</c:forEach>
									</c:if>
								</c:forEach>
							</select>
						</div>
					</td>
					<td>
						<div class="drop" code="codeType15">
							<select name="sevenDaysVo[${i}].">
								<c:forEach items="${codeTypeList}" var="codeType">
									<c:if test="${codeType.id==15}">
										<c:forEach items="${codeType.codeList}" var="code">
											<option value="${code.id}">${code.name}</option>
										</c:forEach>
									</c:if>
								</c:forEach>
							</select>
						</div>
					</td>
					<td>
						<div class="drop" code="codeType16">
							<select name="sevenDaysVo[${i}].">
								<c:forEach items="${codeTypeList}" var="codeType">
									<c:if test="${codeType.id==16}">
										<c:forEach items="${codeType.codeList}" var="code">
											<option value="${code.id}">${code.name}</option>
										</c:forEach>
									</c:if>
								</c:forEach>
							</select>
						</div>
					</td>
					<td>
						<div class="drop" code="codeType15">
							<select name="sevenDaysVo[${i}].">
								<c:forEach items="${codeTypeList}" var="codeType">
									<c:if test="${codeType.id==15}">
										<c:forEach items="${codeType.codeList}" var="code">
											<option value="${code.id}">${code.name}</option>
										</c:forEach>
									</c:if>
								</c:forEach>
							</select>
						</div>
					</td>
					<td>
						<div class="drop" code="codeType16">
							<select name="sevenDaysVo[${i}].">
								<c:forEach items="${codeTypeList}" var="codeType">
									<c:if test="${codeType.id==16}">
										<c:forEach items="${codeType.codeList}" var="code">
											<option value="${code.id}">${code.name}</option>
										</c:forEach>
									</c:if>
								</c:forEach>
							</select>
						</div>
					</td>

					<td><a href="javascript:void(0)" class="copyLink"> <img
							src="<c:url value="/resources/images/row_copy.png"/>">
					</a></td>
				</tr>
			</c:forEach>

		</table>
		<!--参考数据-->
		<table width="100%" border="1" style="margin-top: 4px;"
			class="sevendays_tb">
			<tr>
				<th width="9%">&nbsp;
				</td>
				<th width="13%">0月0号
				</td>
				<th width="13%">0月0号
				</td>
				<th width="13%">0月0号
				</td>
				<th width="13%">0月0号
				</td>
				<th width="13%">0月0号
				</td>
				<th width="13%">0月0号
				</td>
				<th width="13%">0月0号
				</td>
			</tr>
			<tr>
				<td>最高气温（）</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td>最低气温（）</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td>上午</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td>下午</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td>午间风向</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
		</table>
		<table width="100%" border="1" style="margin-top: 4px">
			<tr>
				<td width="21%" align="center">签名</td>
				<td>&nbsp;制作：<input type="text" size="8" />&nbsp;核对：<select></select></td>
			</tr>
		</table>
		<p style="text-align: center">
			<input type="button" value="保存" /><input type="button" value="发布" /><input
				type="button" value="复原" />
		</p>
	</div>

	<jsp:include page="./menuWithDrag.jsp"></jsp:include>

</body>
</html>